home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
bbs
/
maxkit25.zip
/
MAXBDL25.ARJ
/
MAXBDL25.MEX
next >
Wrap
Text File
|
1996-11-04
|
3KB
|
94 lines
// ==========================================================================
// Copyright 1995 1997 by Gerry Ellison. All rights reserved.
// File: MAXBDL25.MEX
// Desc: Displays a list of users birthdays to con, file or both.
// --------------------------------------------------------------------------
#include <max.mh>
#include <intpad.mh>
int main(string: argv) { // begin birthday list
int: ok, cy, chh, cnt;
char: fd, nonstop;
string: cm, cd, bbs, LCB, LMB, YM, YB, line, line2, bdlpath;
struct _usr: u;
struct _stamp: now;
// CHANGE THIS FOR YOUR BBS.
// --------------------------------------------------------------------------
bdlpath := "C:\\Max\\Maxkit\\Birthlst.bbs"; // path and name of birthday list
bbs := " The Mountain Top BBS! "; // put your bbs name HERE!
// ATT. │ │NO longer then this!
// --------------------------------------------------------------------------
remove(bdlpath); // deletes Birthlst.bbs
timestamp(now);
cm:=intpadleft(now.date.month,2,'0');
cd:=intpadleft(now.date.day,2,'0');
cy:=(now.date.year)+1980;
reset_more(nonstop);
{
LCB:="\x16\x01\x10\x9B";
LMB:="\x16\x01\x10\x9D";
YM:="\x16\x01\x5E";
YB:="\x16\x01\x1e";
print("\fMAXBDL25\n");
line := "\f\n\n "+LCB+"┌"+strpad("─",31,'─')+"┬"+strpad("─",40,'─')+"┐"
COL_GRAY"\n "+LCB+"│"+YM+"░▒▓█"+bbs+"█▓▒░"+LCB+"│"+strpad(" ",15,' ')+YB+cm+"-"+cd+"-"+itostr(cy)+LCB+strpad(" ",15,' ')+"│"
COL_GRAY"\n "+LCB+"├"+strpad("─",31,'─')+"┴"+strpad("─",40,'─')+"┤"
COL_GRAY"\n "+LCB+"│"+strpad(" ",27,' ')+YB+"Congratulations to"+LCB+strpad(" ",27,' ')+"│"
COL_GRAY"\n "+LCB+"│ "+bbs+" users who have birthdays today: │"
COL_GRAY"\n "+LCB+"├"+strpad("─",72,'─')+"┤"
COL_GRAY"\n "+LCB+"│"+strpad(" ",72,' ')+"│"COL_GRAY;
if (argv = "")
print("\n"+line+"\n");
else
print("Compiling C:\Max\Misc\Maxbdl25.bbs.\n");
{
for (ok := userfindopen("","",u);
ok AND do_more(nonstop, COL_CYAN);
ok := userfindnext(u))
if(substr(u.dob,6,2)+substr(u.dob,9,2) = cm+cd)
{
cnt := cnt+1;
if (cnt = 1) {
fd := open(bdlpath, IOPEN_CREATE | IOPEN_WRITE);
writeln(fd, "");
writeln(fd,line);
}
line2 := " "+LCB+"│ "+strpad(u.name,28,' ')+strpad(u.city,36,' ')+
"│"COL_GRAY"\n";
if (argv = "")
print(line2);
line2 := " "+LCB+"│ "+strpad(u.name,28,' ')+strpad(u.city,36,' ')+
"│"COL_GRAY;
writeln(fd, line2);
}
}
line := " "+LCB+"│"+strpad(" ",72,' ')+"│"COL_GRAY"\n "+
LCB+"╚"+strpad("═",72,'═')+"╝"COL_GRAY"\n";
if (argv = "")
print(line+"\n");
if (cnt >= 1) {
writeln(fd,line);
line := " â";
writeln(fd,line);
close(fd);
}
if (argv = "")
menu_cmd(106,""); //press enter
}
} // end birthday list